package com.abl.controller.system;

import com.abl.common.security.annotation.ResC;
import com.abl.common.security.annotation.ResM;
import com.abl.domain.model.Param;
import com.abl.domain.model.SRS;
import com.abl.controller.BaseController;
import com.abl.service.system.SysLogService;
import com.alibaba.fastjson2.JSONObject;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@ResC("日志管理")
@Tag(name = "日志管理")
@RestController
@RequestMapping("/system/log")
public class SysLogController extends BaseController {
    @Autowired
    private SysLogService service;

    @ResM("分页查询")
    @PostMapping("/pageLogin")
    public SRS<Object> pageLogin(@RequestBody Param<JSONObject> param) {
        return SRS.bySuccess(service.pageLogin(param));
    }

    @ResM("分页查询")
    @PostMapping("/pageAction")
    public SRS<Object> pageAction(@RequestBody Param<JSONObject> param) {
        return SRS.bySuccess(service.pageAction(param));
    }

}
